/*
 * @Author: 来自火星的码农 15122322+heyzhi@user.noreply.gitee.com
 * @Date: 2025-06-28 14:58:46
 * @LastEditors: 来自火星的码农 15122322+heyzhi@user.noreply.gitee.com
 * @LastEditTime: 2025-06-30 09:48:49
 * @FilePath: /server/workspace/src/base/marco.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#pragma once
#include<cassert>
#include"util.h"
///assert封装
#define SERVER_ASSERT(x) \
    if(!(x)){\
        SERVER_LOG_ERROR(SERVER_LOG_ROOT())<<"Assertions: "#x \
        <<"\nbacktrace\n" \
        <<Yizhi::BackTraceTostring(2,100,"  ");\
        assert(x);\
    }

/// 带参封装
#define SERVER_ASSERT_MSG(x,msg) \
if(!(x)){\
    SERVER_LOG_ERROR(SERVER_LOG_ROOT())<<"Assertions: "#x \
    <<"\n"<<msg<<"\n" \
    <<Yizhi::BackTraceTostring(2,100,"  ");\
            assert(x);\
}


